package ru.urfc.portal.ui.client.googlets.client.documents;

import ru.urfc.portal.ui.client.BaseDocument;
import ru.urfc.portal.ui.client.descriptor.GridDescriptor;

import com.extjs.gxt.ui.client.widget.form.TextArea;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Widget;

public class Letter extends BaseDocument {

	interface Binder extends UiBinder<Widget, Letter> {}
	private static Binder binder = GWT.create(Binder.class);
	
	@UiField TextField<String> subject;
	@UiField TextArea body;
	
	@Override
	protected void init(GridDescriptor descriptor) {
		initWidget(binder.createAndBindUi(this));
		
		descriptor.setAddFieldPathPrefix("date");
		descriptor.addTextField("subject", subject);
		descriptor.addTextField("body", body);
		descriptor.setAddFieldPathPrefix("");
	}

}
